package com.ruoyi.erp.transportation.service.Impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.erp.transportation.domain.Transportation;
import com.ruoyi.erp.transportation.mapper.TransportationMapper;
import com.ruoyi.erp.transportation.service.TransportationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author QiuRongYu@itcast.cn
 * @version 1.0
 * @date 2020/12/14
 */
@Service
public class TransportationServiceImpl implements TransportationService {
    @Resource
    private TransportationMapper transportationMapper;

    @Override
    public List<Transportation> transportationList(Transportation transportation) {
        return transportationMapper.selectList(transportation);
    }

    @Override
    public void transportationAdd(Transportation transportation) {
        transportationMapper.insertAdd(transportation);
    }

    @Override
    public void edittransportation(Transportation transportation) {
        transportationMapper.updatetransportation(transportation);
    }

    @Override
    public Transportation transportationselect(String shipViaCode) {
        return transportationMapper.selectT(shipViaCode);
    }

    @Override
    public void remove(String ids) {
        String[] shipViaCode = Convert.toStrArray(ids);
        transportationMapper.deleteByIds(shipViaCode);
    }

    @Override
    public List<Transportation> selectList(Transportation transportation) {
        return transportationMapper.selectList(transportation);
    }

}
